#! /usr/bin/env python

'''
    这是handlerCore处理器核心的实现类

'''
import time
import rospy
import sys
sys.path.append("/home/galm/ms_01/src/command_receiver/scripts/query_controller")
sys.path.append("/home/galm/ms_01/src/command_handler/scripts/cases")
from handlerCore import HandlerCore
from caseManagersImpl import CaseManager


class HandlerCoreImpl(HandlerCore):

    def __init__(self):
        self.manager = CaseManager()


        

    def change(self,preState,curState,cmdDir):
        rospy.loginfo("[core]:切换模式")
        self.manager.stop(preState)
        time.sleep(2)
        self.manager.start(curState,cmdDir)

    def update(self,state,cmdDir):
        rospy.loginfo("[core]:更新模式")
        self.manager.update(cmdDir)
